-- GENERATED SPELL FOR [Mith'rethis the Enchanter] --


function spell0_8217(pUnit, Event) --@Enchanted Quickness,n/a--
pUnit:FullCastSpellOnTarget(3443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8217', 18000, 1)
end

function spell1_8217(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(15654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8217', 18000, 1)
end

function spell2_8217(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8217', 10000, 1)
end

function Sorts_8217(pUnit, Event)
local choix_sorts_8217 = math.random(0, 2)
if choix_sorts_8217 == 0 then
pUnit:RegisterEvent('spell0_8217', 1, 1)
end
if choix_sorts_8217 == 1 then
pUnit:RegisterEvent('spell1_8217', 1, 1)
end
if choix_sorts_8217 == 2 then
pUnit:RegisterEvent('spell2_8217', 1, 1)
end
end

function mob8217_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8217', math.random(1500, 3000), 1)
end

function mob8217_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8217_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8217_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8217, 1, 'mob8217_Action')
RegisterUnitEvent(8217, 2, 'mob8217_Leave')
RegisterUnitEvent(8217, 3, 'mob8217_Kill')
RegisterUnitEvent(8217, 4, 'mob8217_Die')
